#pragma once

#include "Defines.h"

#define REGEN_RATE 1
#define MAX_HEALTH 10

class Health
{
private:
	int Current;
	bool Dead;
public:
	Health(){Current = MAX_HEALTH;Dead = false;}
	~Health(){Current = 0;Dead = true;}
	int CheckHealth(){return (Dead == true ? -1 : Current);}
	void Reset(){Dead == false ? Current = MAX_HEALTH : Current = 0;}
	void TakeHit(int Dam){Current = (Current-Dam) < 0 ? (0,Dead=true) : Current-Dam;}
	void Update(){Current = (Current+REGEN_RATE) < MAX_HEALTH ? Current+REGEN_RATE : MAX_HEALTH;}
};